package com.cy8;

import java.math.BigInteger;

class Solution {
    public long stringToInt(String s) {
        long ans = 0;
        int m = 0;
        for (int i = s.length() - 1; i >= 0; i--) {
            ans += (s.charAt(i) - 48) * Math.pow(10, m++);
        }
        return ans;
    }
    public String addStrings(String num1, String num2) {
        long sum = stringToInt(num1) + stringToInt(num2);
        if (sum == 0) {
            return "0";
        }
        StringBuilder sb = new StringBuilder();
        while (sum > 0) {
            sb.append(sum % 10);
            sum /= 10;
        }
        return sb.reverse().toString();
    }
    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.addStrings("95", "256"));
    }
}